package com.irs.irsforum.entity;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 
 * </p>
 *
 * @author yihuili
 * @since 2020-01-19
 */
@Data
public class Student extends Model<Student>{

    private static final long serialVersionUID = 1L;

    /**
     * 学生id
     */
	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 学号
     */
	@TableField("stu_no")
	private String stuNo;
    /**
     * 加密的盐
     */
	private String salt;
    /**
     * 用户名
     */
	@TableField("stu_name")
	private String stuName;
    /**
     * 密码
     */
	@TableField("stu_pwd")
	private String stuPwd;
    /**
     * 昵称
     */
	@TableField("stu_nickName")
	private String stuNickname;
    /**
     * 用户头像
     */
	@TableField("stu_img")
	private String stuImg;
    /**
     * 邮箱地址
     */
	@TableField("stu_email")
	private String stuEmail;
    /**
     * 手机号
     */
	@TableField("stu_phone")
	private String stuPhone;
    /**
     * 0-未知，1-男，2-女
     */
	@TableField("stu_sex")
	private Integer stuSex;
    /**
     * 年龄
     */
	@TableField("stu_age")
	private Integer stuAge;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;



    @Override
	protected Serializable pkVal() {
		return this.id;
	}

	@Override
	public String toString() {
		return "Student{" +
			"id=" + id +
			", stuNo=" + stuNo +
			", salt=" + salt +
			", stuName=" + stuName +
			", stuPwd=" + stuPwd +
			", stuNickname=" + stuNickname +
			", stuImg=" + stuImg +
			", stuEmail=" + stuEmail +
			", stuPhone=" + stuPhone +
			", stuSex=" + stuSex +
			", stuAge=" + stuAge +
			", createTime=" + createTime +
			"}";
	}


}
